package com.villaday.idf.adapter3;

import android.content.Context;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.villaday.idf.base.AbsRecyclerViewAdapter;
import com.villaday.idf.model3.HotelDetailsEntity;

import com.villaday.idf.R;

public class InstallationAdapter extends AbsRecyclerViewAdapter<HotelDetailsEntity.BodyBean.FacilitiesBean> {


    public InstallationAdapter(Context context) {
        super(context, com.villaday.idf.R.layout.recycle_installation);
    }

    @Override
    public void onBindHolder(AbsRecyclerViewAdapter.RecyclerViewHolder holder, HotelDetailsEntity.BodyBean.FacilitiesBean d, int position) {

        holder.bindTextView(R.id.tv_il_title, d.getName());

        RecyclerView recyclerView = (RecyclerView) holder.getView(R.id.rv_il_base);
        recyclerView.setLayoutManager(new GridLayoutManager(context, 2));
        InstallationDetailsAdapter installationDetailsAdapter = new InstallationDetailsAdapter(context);
        recyclerView.setAdapter(installationDetailsAdapter);
        installationDetailsAdapter.setData(d.getList());
    }
}
